import os
import shutil


# filename = "anxin.txt"
# file = open(filename, 'w+', encoding='utf-8')#1.打开文件，w+读写
#
# file.write("安心最帅")#wirte写入
#
# file.seek(0)#指针置0
#
# content = file.read()#read读取
# print(content)
#
# file.close()#2.关闭文件


#3.复制文件
# shutil.copy("anxin.txt","copy.txt")

#4.重命名文件
# os.rename("copy.txt","copy1.txt")

#5.删除文件
os.remove("copy1.txt")














